<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>vue.js常用指令的测试</title>
		<script src="vue.min.js"></script>
	</head>
	<body>
		<div id="app">
			
		
			<ul>
				<li v-for="(item,index) in list" :key="index" v-if="index %2 ==0">{{index}} -- {{item}}</li>
				<li v-for="(value,key) in user ">{{key}}:{{value}}</li>
				<li v-for="(item,index) in list1" :key="item.user.uname">
					<div v-if="item.user.uname=='itheima'" style="background-color: #222323;"></div>
				{{item.user.uname}}
				</li>
			</ul>
		</div>
		
	</body>
	<script>
		var VM = new Vue({
			el: '#app',
			data: {
				list:[1,2,3,4,5],
				user:{uname:"itcast",age:10},
				list1:[
					{user:{uname:"itcast",age:10}},
					{user:{uname:"itheima",age:11}}
				]
			
			}
		});
	</script>
</html>
